package homework.billing.ui;

import homework.billing.MeterFactory;
import homework.billing.UnsupportedMeterException;
import homework.billing.meter.FullMeter;

public class SelectOption {

    private String name;
    private FullMeter meter;

    public SelectOption(String name) throws UnsupportedMeterException {
        this.name = name;
        meter = MeterFactory.createMeter(name);
    }

    @Override
    public String toString() {
        return name;
    }

    public FullMeter getMeter() {
        return meter;
    }
}
